<%@ page import="com.shemy.entity.SysRole" %>
<%@ page import="java.util.List" %>
<%@ page import="com.shemy.entity.SysMenu" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>SSM 框架整合</title>

</head>
<%
    String username = request.getSession().getAttribute("username").toString();
    List<SysRole> roles = (List<SysRole>) request.getSession().getAttribute("roles");
    List<SysMenu> menus = (List<SysMenu>) request.getSession().getAttribute("menus");
%>

<body>
欢迎回来，<%=username%>
<div>角色：
<c:forEach items="<%=roles%>" var="role">
   <span>${role.roleName} ,</span>
</c:forEach>
</div>
<div>权限：
<c:forEach items="<%=menus%>" var="menu">
    <span><a href="/user${menu.url}"> ${menu.menuName}</a> ,</span>
</c:forEach>
</div>
</body>
</html>
